<%--
  Created by IntelliJ IDEA.
  User: 30969
  Date: 2024/1/10
  Time: 9:43
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<script src="/js/util.js" type="text/javascript" charset="UTF-8"></script>
<body>
<form action="reg_action.jsp" method="post" onsubmit="return checkForm()">
    <%--      input[type='text'][name][id]*3     --%>
    账号： <input type="text" name="name" id="name" autocomplete="off"> <br/>
    密码： <input type="password" name="pwd" id="pwd"> <br/>
    年龄： <input type="text" name="age" id="age"> <br/>
    <input type="submit" value="注册">
</form>

<script>
    function checkForm() {
        var name = $("name").value;
        var pwd = $("pwd").value;
        var age = $("age").value;

        if (name == "" || pwd == "" || age == "") {
            return false;
        } else {
            return true;
        }

    }
</script>

</body>
</html>
